build: Initialize automake earlier

This reorders the macros so that AC_USE_SYSTEM_EXTENSIONS comes after
initializing automake. Without this, $install_sh doesn't get expanded
properly, causing errors like:

/bin/sh: /home/kalev/install-sh: No such file or directory
install: cannot create regular file ‘/media/build/gnome/_jhbuild/root-gnome-initial-setup/media/build/gnome/share/locale/af/LC_MESSAGES/gnome-initial-setup.mo’: No such file or directory

Related: https://bugs.freedesktop.org/show_bug.cgi?id=66413
Updated Latvian translation