Segfault calling OpenSSL library from Perl