fix symbol problem on OSX (fix #405)