A memory-efficient dynamic programming algorithm for optimal alignment of a sequence to an RNA secondary structure