configure: better test for mktemp

Some variants of mktemp require a template, so provide one when
checking for the command.  We already supply a template in the
subsequent uses of mktemp.

Thanks to Michael Kostylev.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit a210bce298281aa08516893580089d102afb2e4d)
