support axis=None for nanmedian ( issue #7352 )

This fixes issue #7352, where ``nanmedian`` does not work when ``axis==None``.
Done.