Andrew Shinnie grabbed a last-gasp winner to keep Livi's slim title hopes alive