Update csrf token function, provide support for those without openssl