Fix headless bitmap rendering crash.

This addresses issue #790.