Fixes #1624 - Avatar extension check

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