glGenVertexArrays() interface was added to OpenGL core contexts in version 3.0, the same version in which immediate mode rendering was removed from OpenGL (although it had long since been deprecated, 3.0 is where it finally absolutely went away)
So you are correct. If immediate mode drawing works, then you are using an OpenGL context old enough that
glGenVertexArrays() hasn't yet been added to the standard, and may therefore be unavailable.
Some drivers may provide the old immediate-mode rendering interfaces in a 3.x context via a compatibility context, or may provide 3.0-style interfaces via EXT or ARB extensions on a 2.1 context, but neither of these are guaranteed to be available on any particular hardware/driver/OS. (OSX's OpenGL drivers in particular don't currently provide compatibility contexts or debug contexts. But the OpenGL spec doesn't mandate that anyone has to provide those, so you can't assume that anyone has them on any platform, not just OSX. You could quite possibly run into exactly the same problem on any computer in the world, if their video drivers simply didn't implement support for an OpenGL compatibility profile.)
Really, you want to pick whether you're going to use old-style OpenGL rendering or new-style OpenGL rendering, and stick with that choice for a whole program; not try to mix between immediate-mode fixed-function rendering and modern VBO-and-shader-based rendering.