Changes to the build system for proper cross-platform building