Add a version check for optional matplotlib dependency.

Fixes Issue #98. 
a little redundant, but it doesn't cost anything extra to reimport matplotlib here.