Fix for import error with matplotlib Qt4Agg backend