Use mkostemp instead of mktemp where available