Fix type mismatches between foreign imports and HsBase.h