fix configuration on windows
add /${CMAKE_CFG_INTDIR} where needed for compatibility with Visual Studio build
fix array declaration that doesn't compile with MSVC