A glass company in Portsmouth has been fined after a worker was injured when his clothing was caught in machinery.