Fix debug detection on Heroku