windows: Use windows API calls instead of libtool.