Minor fixes for cross platform building