Better OSX support using GCD (Grand Central Dispatch) and gcl_ functions.

This also fixes #1, which turned out to be caused by violating restrictions specified by the OpenCL Specification, 6.9.o: not keeping the structs in the same address space.