Fix build with GHC 7.6.3

Added conditional check around -dynamic-too flag. This flag exists
only in GHC HEAD, which causes compilation error with current
stable versions of GHC.