gallery/Chart: fix build error on GHC 7.4