Fix hangs in some tests w/ OCL stub on Windows w/ MingGW 64-bits

Problem was that the gulong type has size 4 bytes with this
configuration, and more memory was being copied than allowed,
when reading a vector, causing either an infinite loop or a
segfault, depending on the program mood. This commit fixes #11,
fixes #12 and fixes #13 .