Skip the perl tests when building for a headless system.

Summary:
The tests fail due to a missing X11 connection, so we do not run
them for non-X11 builds.

Test Plan: Already tested locally.

Reviewers: lisbethb

Reviewed By: lisbethb

Differential Revision: https://phab.met.no/D13