fix build to suit all platform