Fixes #1624 - Avatar extension check

Revert code to MyBB 1.6. Lang file must be changed (next commit).