Win64 and Mac compile fixes