Fixed bug in AVX detection and added AVX2 detection
Fixed build for arm platforms
Fixed Visual Studio 2010 build