Fix compilation of portable profile
Fixes for Portable Libraries