Fix building with compilers without inline asm support

Also fix crash in high bit depth builds compiled with unaligned stack.
OpenCL cosmetics