Build fixes for linux and windows.