Fix build problems on Windows by explicitly exporting/importing "function".