replace lpack with struct

lpack is not available for lua 5.2. so use the better maintained struct
module with almost the same features.