compile fixes for windows