Apply selective curves support from otp/maint

This patch was merged into OTP some time ago and fixes crypto on systems such as Fedora. 
Your PR must be a little out of date, because the current version is already basho6.  Please update your branch and bump it to basho7.  Thanks.