Goos–Hänchen and Imbert–Fedorov shifts of an electromagnetic wave packet by a moving object