Backport 1.8 3900

Backport #3900: `Ensure NotImplemented is passed on in MaskedArray ufunc's`