Fix Mojo::DOM::attrs deprecation and hash sort on 5.18.0