The ability to switch between insecure and secure connection when using ESP8266 boards is a good change, but it would be more helpful if the change were controllable via code or pre-processor definition.
This would mean there is no need to change the distributed libraries
Ideally, we could have a simple preprocessor macro such as
#define AIO_ESP8266_SECURE 1
Alternatively, just create another class