Reverted dynamic array to malloc change, which caused segfault on OSX (maybe bug elsewhere) and made llvmopencl lib to link on Visual Studio.