support for older matplotlib versions