Ssl detection via ctypes

Alternative to #205.