it's --enable since the extension doesn't use any libs
fix static and external builds
fix memleak
remove nonexistent __construct() function
connect in the __construct(), not on request

+ don't segfault when connect has failed
+ don't leak memory in the destructor