Incldue <algorithm> in prpack, fix building on Solaris

Reported by Lei Zhang. Thanks!