Fix compiler errors.
Merge pull request #253 from darnuria/fix-compilation

Fix compiler errors due to unboxed closures and bitflags.