Make build work with and without LAZperf.

Close #658