Use Win32 API to get the full exe path; argv[0] uses forward slashes which messes up path joining later

Add some defines to the Code::Blocks project hat were missing