adds 1.8.7 compatibility. fixes #2

This adds 1.8.7 compatibility by avoid crash at startup.

Fixes #2