Unsuccesful window creation with GLFW on PX2

After cross-compiling an application for the PX2, GLFW throws the following error upon window creation in GLES mode:

GLFW Failed with error code 0x10008:
Failed to retrieve context version string
WindowGLFW: Failed to create window

The window code is exactly the same as in samples/common/WindowGLFW.cpp.
Also glxinfo | grep OpenGL returns the version strings just fine:

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GP10B (nvgpu)/integrated
OpenGL core profile version string: 4.5.0 NVIDIA 384.00
OpenGL core profile shading language version string: 4.50 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5.0 NVIDIA 384.00
OpenGL shading language version string: 4.50 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 384.00
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

What could be the issue here?