Changed static allocation of pthread variables to dynamic to avoid compilation warnings.