Use /dev/null in invalidate_fd to avoid infinite loop in OpenSSL

Thanks to Andy Bakun / @thwarted for identifying the issue and
suggesting the /dev/null workaround.