trivial: Fix the example spec file when building the deprecated parts
Fix FTBFS on GNU/Hurd

Currently appstream-glib FTBFS on GNU/Hurd due to usage of PATH_MAX,
which is not defined. The attached patch solves this problem by
dynamically allocating strings of required length, and free them after
usage if needed.

Many thanks to Svante Signell for the initial patch!