Even if it is a little late now, when firefox 58 runns with H.264 support without tricks, here how I got firefox 57 supporting H.264:
Create these files in /usr/lib by copying from or linking to the libraries in /usr/local/lib:
libavcodec.so.54
libavutil.so.52
libcdio++.so.0
libcelt0.so.2
libfaac.so.0
libmp3lame.so.0
liborc-0.4.so.0
libschroedinger-1.0.so.0
libspeex.so.1
libtheoradec.so.1
libtheoraenc.so.1
libtwolame.so.0
libvpx.so.1