Apply selective curves support from otp/maint

This patch was merged into OTP some time ago and fixes crypto on systems such as Fedora.