Don't break environments without window

Encountered while upgrading old haml_coffee_assets (first appears in haml-coffee 1.13.0 - haml_coffee_assets 1.15.0)