resolve link errors in msys