Fix build for the perl option