Change this to `except ImportError:`

Or better yet, instead of re-implementing this, you could pull from the #179 branch and have @kostya0shift's changes pulled into this PR directly.