Define a static variable to fix debug mode crash.

Fixes #404