Thanking God for his gifts brings joy, pope says on Marian feast day