The issue was caused by the following construction:
def = env['SOMETHING']
defs.append('SOMETHING_MORE')
Since first assignment was actually referencing environment option it was totally
polluted hawing weird and wonderful side effects on all other areas of Blender.
Ghost depends on glew-mx, so glew-mx should be passed to linker after the ghost.
We're also using spaces for indentation in python, including scons rules.