Calculation of the hyperfine splitting constants for diatomic molecules using numerical wavefunctions