Fix ${target_os} expansion in configure.ac

Adds missing AC_CANONICAL_{TARGET,SYSTEM} calls in configure.ac
to initialize ${target_os} and other variables. Without changes
${target_os} is always undefined (an empty string).