Apple graphics drivers are notoriously fickle. Up until last year they were years out of date. I have a 2010 macbook pro that supports OpenGL 3.2 when booted into Windows, but only supports OpenGL 2.0 when booted up into OSX. Looking at your iMac, since it's a 2009 model it likely falls under the same category. Either that, or the GPU simply can't support 4096x4096 textures. Considering that it only has 256 MB of video memory, and 4k by 4k texture takes 67 megabytes (in other words 25% of it), that's also entirely possible.