Replaced static var by unnamed enum to fix link error on osx.