avoid apache segfault when registering exception class