Add a version check for optional matplotlib dependency.

Fixes Issue #98.