Pull out O_CLOEXEC flag from open(2) to compile with uclibc

uclibc is missing pread, pwrite, and open_memstream from its header
files, but the O_CLOEXEC was the only one causing an error. The others
compile and link with only warnings. Note that this is uclibc only. MUSL
and glibc compile without warnings except from the 3rd party sha-1 code.