Merge changes Id416ea15,I725ce638

* changes:
  Fix Portable build
  Change GetPortableCode result from reference to pointer