build: Don't assume we can set permissions on a directory
MSYS2 has enough of a Unixish environment to run Autotools, but apparently not enough of a Unixish environment to have functional permissions.
Closes: #216 (closed)
(cherry picked from commit 14f46d14)