The Lanford-Ruelle theorem for actions of sofic groups