fix compile error for ghc 7.8.2