Include stdlib.h
Fix llvm 3.6 build
Merge branch 'master' into gpu