Fixes for building on hpux

Creating 1000 entries is too much on that small hard drive, therefore
reducing it to 2. After all, even one entry will do the trick of
corrupting the file.
(cherry picked from commit 2d8f47a18f09f85cb70eeb405f409756b2771b35)
Merge pull request #961 from cduclos/3.5.x

Fixes for building on hpux