fix uninitialized constant "NameError" on Mac OS X