various build fixes for internal libosr