Fix compilation of portable profile
Fixes for Portable Libraries
Merge pull request #240 from ovatsus/master

Fixes for portable libraries