Build fixes for non-MSVC