Add Functor and Applicative instances for GHC 7.10 compatibility