match compiler flags for linux and osx, fix array sizes