Using discardStaticFlags for GHC 7.7 to fix #64.

This is tested with GHC 7.4.1, 7.6.3 and GHC head. All tests are passed.