Adds check for M2Crypto get_extensions() support

Change-Id: I5227ca07d2f234f55bf4dfc1556455f318a70ded
Closes-Bug: 1399670